import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const ranking = () => import("../components/tab/ranking.vue");
const singer = () => import("../components/tab/singer.vue");
const search = () => import("../components/tab/search.vue");
const recommend = () => import("../components/tab/recommend.vue");
const pzww = () => import("../components/tab/info/pzww.vue");
const honeysea = () => import("../components/tab/info/honeysea.vue");
const orze = () => import("../components/tab/info/orze.vue");

const routes = [
  { path: "/recommend", component: ranking },
  { path: "/singer", component: singer },
  { path: "/search", component: search },
  {
    path: "/index",
    component: recommend,
    children: [
      {
        name: "pzww",
        path: "pzww",
        component: pzww,
        meta: {
          showfater: false,
        },
      },
      {
        name: "honeysea",
        path: "honeysea",
        component: honeysea,
        meta: {
          showfater: false,
        },
      },
      {
        name: "orze",
        path: "orze",
        component: orze,
        meta: {
          showfater: false,
        },
      },
    ],
    meta: {
      showfater: true,
    },
  },
  { path: "/", redirect: "/index/" },
];

const router = new VueRouter({
  routes,
});
export default router;
